import {customeStruct} from '../utils';
const itf = customeStruct.interface;

export const DetailDataStruct = itf({
    payload: itf({
        id: 'string',
        code: 'string',
        name: 'string',
        shortCode: 'string? | null',
        shortName: 'string? | null',
        contactName: 'string? | null',
        contactPhone: 'string? | null',
        regionId: 'string? | null',
        dealerCode: 'string? | null',
        dealerName: 'string? | null',
        countryName: 'string? | null',
        provinceName: 'string? | null',
        cityName: 'string? | null',
        address: 'string? | null',
        fax: 'string? | null',
        zipCode: 'string? | null',
        email: 'string? | null',
        rowVersion: 'string',
    })
});

export const List = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string',
            dealerCode: 'string',
            dealerName: 'string',
            shortCode: 'string? | null',
            shortName: 'string? | null',
            countryName: 'string? | null',
            provinceName: 'string? | null',
            cityName: 'string? | null',
            contactName: 'string? | null',
            contactPhone: 'string? | null',
            address: 'string? | null',
            status: 'number',
            rowVersion: 'string',
            options: ['string']
        })],
        totalElements: 'number',
    })
});

export const DealerList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            code: 'string',
            name: 'string',
            shortCode: 'string? | null',
            shortName: 'string? | null',
            countryName: 'string? | null',
            provinceName: 'string? | null',
            cityName: 'string? | null',
            contactPhone: 'string? | null',
            address: 'string? | null',
        })],
    })
});

export const MarketDepartmentList = itf({
    payload: [itf({
        id: 'string',
        code: 'string',
        name: 'string',
        isLeaf: 'boolean',
    })]
});

export const RegionList = itf({
    payload: itf({
        content: [itf({
            id: 'string',
            name: 'string',
        })],
    })
});
